package cn.com.czpb.client.module.news.adapter;

import com.chad.library.adapter.base.BaseMultiItemQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;

import java.util.List;

import cn.com.czpb.client.R;
import cn.com.czpb.client.model.news.MediaNewsBean;
import cn.com.czpb.client.utils.SPUtil;

/**
 * Created by Administrator on 2017/12/26.
 */

public class HScrollNewsItemAdapter extends BaseMultiItemQuickAdapter<MediaNewsBean, BaseViewHolder> {
    private boolean flag = true;
    private SPUtil spu;
    private String type;
    /**
     * Same as QuickAdapter#QuickAdapter(Context,int) but with
     * some initialization data.
     *
     * @param data A new list is created out of this one to avoid mutable list
     */
    public HScrollNewsItemAdapter(List<MediaNewsBean> data,boolean flag) {
        super(data);
        this.flag = flag;
        spu = SPUtil.getInstance();
        this.type = spu.getShowImage();
//        addItemType(6,R.layout.item_news_scroll);
    }

    @Override
    protected void convert(BaseViewHolder helper, MediaNewsBean item) {
        helper.setText(R.id.item_news_scroll_title,item.getTitle()+"");
    }
}
